import myRequest from './index.js'

// 获取个人信息，需要登录后才能获取用户个人信息
export function getMemberProfile(){
	return myRequest.get("/member/profile")
}

// 更新个人信息
export function updateMemberProfile(data){
	return myRequest.put("/member/profile", data)
}

// 新增收货地址
export function addMemberAddress(data){
	return myRequest.post("/member/address", data)
}

// 获取地址列表数据
export function getMemberAddressAPI(data){
	return myRequest.get("/member/address", data)
}

// 点击修改，获取当前详情收货地址
export function getMemberAddressDetail(id){
	return myRequest.get(`/member/address/${id}`)
}

// 更新地址
export function updateMemberAddressDetail(id, data){
	return myRequest.put(`/member/address/${id}`, data)
}

// 删除地址
export function deleteMemberAddressByIdAPI(id){
	return myRequest.delete(`/member/address/${id}`)
}